/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package econutri.persistencia;

import java.io.IOException;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Leonardo Oliveira Moreira
 */
public class Config {

    public static final String getProperty(String key) {
        if (key == null || key.trim().length() == 0)
            return "";
        String result = "";
        Properties properties = new Properties();
        try {
            properties.load(Config.class.getResourceAsStream("config.properties"));
            result = properties.getProperty(key);
            if (result == null || result.trim().length() == 0)
                return "";
        } catch (IOException ex) {
            Logger.getLogger(Config.class.getName()).log(Level.SEVERE, null, ex);
        }
        return result;
    }

    public static void main(String[] args) {
    
    }

}
